// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

import CM from "../../../lib/cache/CM";
import ICache from "../../../lib/cache/ICache";
import { monitor } from "../../../lib/common/Decorator";
import MsgMgr from "../../../lib/event/MsgMgr";
import GameObject from "../../../lib/object/GameObject";
import DRole, { RoleCacheArgs } from "../../cache/DRole";


const {ccclass, property} = cc._decorator;

@ccclass
export default class GORole extends GameObject {

    initData():ICache<RoleCacheArgs>{
        return CM.ins(CM).create<DRole, RoleCacheArgs>(DRole, {id:this.uuid});
    }

    async initSection(): Promise<void> {
        
    }
    @monitor()
    on_pos_change(attrName, oldVal, newVal) {
        //console.warn(`修改了属性${attrName}的值old:${oldVal} new:${newVal}`)
    }
    @monitor()
    on_test_change(attrName, oldVal, newVal) {
        //console.warn(`修改了属性${attrName}的值old:${oldVal} new:${newVal}`)
    }
    
    
}
